﻿///<reference path="../../../../Scripts/jquery-1.4.1-vsdoc.js"/>

function ToolsPaneBase(id) {
    var thisId = id;
    var _container;

    function Init() {

        _container = $("<div>", {
            id: thisId,
            className: "ui-widget ui-widget-content ui-corner-all toolsContainer"
        });

        var toolBar = $("<div>", {
            className: "smallText ui-widget-header ui-corner-all"
        }).appendTo(_container);

        toolBar.append($("<span class='text smallText'><input type='checkbox' id='"
            + thisId + "_BookViewButton' /><label for='"
            + thisId + "_BookViewButton'>Режим изучения</label></span>"));
        _container.find("#" + thisId + "_BookViewButton")
                .bind("click", undefined, OnBookViewChanged)
                .button();
    }


    this.GetContainer = function () {
        return _container;
    }

    this.Show = function () {
        _container.show();
    }

    this.Hide = function () {
        _container.hide();
    }

    ///events//////////
    function OnBookViewChanged() {
        appPointer.MainPaneController.OnBookViewChanged();
    }  

    Init();
}